from django.db import models
# from utils import BaseModel


class BannerBaseModel(models.Model):
    orders = models.IntegerField(verbose_name='显示顺序')
    is_show = models.BooleanField(verbose_name="是否上架", default=False)
    is_delete = models.BooleanField(verbose_name="逻辑删除", default=False)

    class Meta:
        abstract = True


class Banner(BannerBaseModel):
    image = models.ImageField(upload_to='home_banner', verbose_name='轮播图', null=True, blank=True)
    name = models.CharField(max_length=150, verbose_name='轮播图名称')
    note = models.CharField(max_length=150, verbose_name='备注信息')
    search = models.CharField(max_length=150, verbose_name='搜索关键字')

    class Meta:
        db_table = 'travel_banner'
        verbose_name = '轮播图'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.name

# class Home_site(BaseModel):
#     title=models.CharField(max_length=150, verbose_name='主页标题')
#